<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例-属性选择器</title>
    <script src="jquery.js"></script>
    <script>
        $(function (){
            $('[class^=o]').css("color","red")
        })
    </script>
</head>
<body>
    <h1 class="one">java</h1>
    <h2 id="two" class="two">html</h2>
    <h3 id="three">css</h3>
</body>
</html>